<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../static/js/vue.js"></script>
</head>
<body>

<div id="app">

    <h1>{{msg}}</h1>

<!--    <login title="我是标题"></login>-->

    <login v-bind:name1="name"></login>

    <input type="text" v-model="name">


</div>

</body>
</html>

<script>

    const login = {
        // template: `<div><h1>login组件</h1><h1>{{count}}, {{title}}, {{loginTitle}}</h1></div>`,
        template: `<div><h1>{{name1}}</h1></div>`,
        data(){
            return{
                count: 2,
                loginTitle: this.title,
            }
        },
        props: ['name1'],
    }

    new Vue({
        el: "#app",
        data:{
            msg: "组件间数据传递",
            name: "Vue管理的变量",
        },
        method:{},
        computed: {},
        components:{
            login: login,
        }
    });


</script>